package com.example.entity;

import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import lombok.Data;

@Data
@TableName(value = "questions", autoResultMap = true)
public class Question {
    
    // 试题ID
    @TableId(type = IdType.AUTO)
    private Long id;
    
    // 试题内容
    private String content;
    
    // 试题类型: MULTIPLE_CHOICE(选择题), TRUE_FALSE(判断题), FILL_BLANK(填空题), SHORT_ANSWER(简答题)
    private String type;
    
    // 试题难度: 1-5
    private Integer difficulty;
    
    // 分数
    private Integer score;
    
    // 选项内容 (用于选择题，判断题等)
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> options;
    
    // 正确答案
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> answers;
    
    // 答案解析
    private String explanation;
    
    // 所属章节/知识点
    private String knowledgePoint;
    
    // 创建者ID
    private Long creatorId;
    
    // 创建时间
    private LocalDateTime createTime;
    
    // 更新时间
    private LocalDateTime updateTime;
} 